package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	url := "http://www.baidu.com"
	//url := "http://www.google.com"
	resp, err := http.Get(url)
	if err != nil {
		log.Fatalf("get url(%s) occur error %v.", url, err.Error())
		return
	}
	content, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(content))

}
